package com.zhehekeji.opsys.api.entity;

import javax.persistence.Column;
import javax.persistence.Transient;

import com.zhehekeji.opsys.api.util.UUIDUtils;

/**
 * @ClassName MongoEntity
 * @Description TODO
 * @date 2015-6-8   下午12:44:55
 */
public abstract class MongoEntity {

    private Object _id;
    private String code = UUIDUtils.randomUUID();

    @Transient
    public Object get_id() {
        return _id;
    }

    public void set_id(Object _id) {
        this._id = _id;
    }

    @Column(name = "CODE", length = 64, nullable = true)
    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

}

